package com.hoshiicloud.stock.feign;

import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.stock.feign.hystrix.HystrixStoreFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 店铺微服务FeignClient
 *
 * @author : yangcheng
 * @date : 2019/5/6 15:28
 * @mail : maiboyc@163.com
 **/
@FeignClient(name = "hoshiicloud-store", fallback = HystrixStoreFeignFallback.class)
public interface StoreFeignService {

    /**
     * 根据id获取
     * @param id ID
     * @return Response
     */
    @RequestMapping(value = "/store/plat-store/{id}", method = RequestMethod.GET)
    Response getById(@PathVariable("id") Long id);
}
